// node后端服务器
const http = require('http');
const bodyParser = require('body-parser');
const express = require('express');
const movieApi = require('./api/movie.js');
// const cors = require("cors")

let app = express();
let server = http.createServer(app);

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
    extended: false
}));
// app.use(cors);

// 后端api路由
app.use('/movie', movieApi);

// 启动监听
server.listen(8888, () => {
    console.log(' success!! port:8888')
})